gdkdrag-win32.c: Fix drag surface positioning
authorChun-wei Fan <fanchunwei@src.gnome.org>
Fri, 18 Jun 2021 09:58:14 +0000 (17:58 +0800)
committerChun-wei Fan <fanchunwei@src.gnome.org>
Fri, 18 Jun 2021 10:07:50 +0000 (18:07 +0800)
commite35490ba5b6079a15d3be84cbe42d100e46ec120
tree9c4fa568d7cdcf88f852b716e4a122a75dd614aa
parent352898ae9ef91fd1d284844cd2fdaa00e632c570
gdkdrag-win32.c: Fix drag surface positioning

Determine the root_x and root_y coordinates of the drag surface by
relying on the coordinates of the surface where the drag is being
carried out, plus the coordinates that we receive from the drag event,
which is in-line with what the X11 backend does.

This will prevent the drag surface from being initially drawn at the
correct position, but jumping towards the top-left corner of the screen
shortly afterwards.

The DnD support will still need some more updates to function correctly
on Windows, but at least this is a small improvement.

Fixes issue #3798.
gdk/win32/gdkdrag-win32.c
gdk/win32/gdkevents-win32.c